<?php
$username = $_POST['user'];
if ($username!="")
    {
     mysql_connect("localhost","root","");
     mysql_select_db('noc');
 
        $querry ="select username from `admins` where `username` = '$username'";
        $result = mysql_query($querry);

        if(mysql_num_rows($result)>0)
            {
            echo "Username [$username]  already taken response from php";
            }
            else
                {
                echo "username [$username] available to register response from php";
                }
    }
        else
            {
           echo "provide username response from php!";
        }

?>
